
import React, {Component} from 'react';

export default class DataUtil extends Component{

    /**
     * 判断数组是否有重复项
     * @param arr
     * @param obj
     * @returns {boolean}
     */
    static contains(arr, obj) {
        var i = arr.length;
        while (i--) {
            if (arr[i] === obj) {
                return true;
            }
        }
        return false;
    }
}